<div class="modal-dialog modal-dialog-centered modal-dialog-scrollable modal-md" id="newRoomMOdal">
    <div class="modal-content">


        <div class="modal-header  light-blue darken-3 white-text">
            <h5 class="modal-title">{{ title }}</h5>
            <button type="button" class="btn-close" data-mdb-dismiss="modal" aria-label="Close"></button>
        </div>

        <div class="modal-body">
            {% set server = getServer(app.user) %}
            {% if server|length > 0 or isEdit %}
            {{ form_start(form) }}
            <div class="row">
                <div class="col-12 d-flex align-items-start with-help">
                    {% if form.repeaterRemoved is defined %}
                        {{ form_row(form.repeaterRemoved) }}
                    {% endif %}
                    {% if form.server is defined and form.server is not null %}
                        {{ form_row(form.server) }}
                        <a tabindex="0" data-mdb-toggle="popover" data-mdb-trigger="focus"
                           data-mdb-content="{{ 'room.new.help.server'|trans }}"><i
                                    class="fa fa-question-circle"></i></a>
                    {% endif %}

                </div>
                <div id="form_tag_wrapper">
                    {% if form.tag is defined %}
                        <div class="col-12 d-flex align-items-start with-help">
                            {{ form_row(form.tag) }}
                            <a tabindex="0" data-mdb-toggle="popover" data-mdb-trigger="focus"
                               data-mdb-content="{{ 'room.new.help.tag'|trans }}"><i
                                        class="fa fa-question-circle"></i></a>
                        </div>
                    {% endif %}
                </div>

                {% if form.moderator is defined %}
                    <div class="col-12 d-flex align-items-start with-help">
                        {{ form_row(form.moderator) }}
                        <a tabindex="0" data-mdb-toggle="popover" data-mdb-trigger="focus"
                           data-mdb-content="{{ 'room.new.help.manager'|trans }}"><i
                                    class="fa fa-question-circle"></i></a>
                    </div>
                {% endif %}
                <div class="col-12 d-flex align-items-start with-help">
                    {{ form_row(form.name) }}
                    <a tabindex="0" data-mdb-toggle="popover" data-mdb-trigger="focus"
                       data-mdb-content="{{ 'room.new.help.name'|trans }}"><i
                                class="fa fa-question-circle"></i></a>
                </div>
                <div class="col-12 d-flex align-items-start with-help">
                    {{ form_row(form.agenda) }}
                    <a tabindex="0" data-mdb-toggle="popover" data-mdb-trigger="focus"
                       data-mdb-content="{{ 'room.new.help.agenda'|trans }}"><i
                                class="fa fa-question-circle"></i></a>
                </div>

                {% if form.persistantRoom is defined %}
                    <div class="col-12 d-flex align-items-start with-help">
                        {{ form_row(form.persistantRoom) }}
                        <a tabindex="0" data-mdb-toggle="popover" data-mdb-trigger="focus"
                           data-mdb-content="{{ 'room.new.help.persistant'|trans }}"><i
                                    class="fa fa-question-circle"></i></a>
                    </div>
                {% endif %}

                <div class="col-lg-12">
                    <div id="roomStartForm" class="collapse show">
                        {% if extra is defined and extra is not null %}
                            <p class="text-danger">{{ extra }}</p>
                        {% endif %}
                        <div class="row">
                            {% if form.start is defined %}
                                <div class="col-12  d-flex align-items-start with-help">
                                    {{ form_row(form.start) }}
                                    <a tabindex="0" data-mdb-toggle="popover" data-mdb-trigger="focus"
                                       data-mdb-content="{{ 'room.new.help.start'|trans }}"><i
                                                class="fa fa-question-circle"></i></a>
                                </div>
                            {% endif %}
                            <div class="col-12  d-flex align-items-start with-help">
                                {{ form_row(form.duration) }}
                                <a tabindex="0" data-mdb-toggle="popover" data-mdb-trigger="focus"
                                   data-mdb-content="{{ 'room.new.help.duration'|trans }}"><i
                                            class="fa fa-question-circle"></i></a>
                            </div>
                            {% if form.timeZone is defined %}


                                <div class="col-12 d-flex align-items-start with-help">
                                    {{ form_row(form.timeZone) }}

                                    <a tabindex="0" data-mdb-toggle="popover" data-mdb-trigger="focus"
                                       data-mdb-content="{{ 'Wählen Sie hier die Zeitzone aus in welcher das Meeting geplant werden soll. Benutzer in anderen Zeitzonen erhalten die Konferenz in Ihrer lokalen Zeitzone.'|trans }}"><i
                                                class="fa fa-question-circle"></i></a>
                                </div>

                            {% endif %}
                        </div>
                    </div>
                    {% if form.lobby is defined %}
                        <div class="col-lg-12">
                            <div id="lobby" class="row">
                                <div class="col-12 d-flex align-items-start with-help">
                                    {{ form_row(form.lobby) }}
                                    <a tabindex="0" data-mdb-toggle="popover" data-mdb-trigger="focus"
                                       data-mdb-content="{{ 'room.new.help.lobby'|trans }}"><i
                                                class="fa fa-question-circle"></i></a>
                                </div>
                            </div>
                        </div>
                    {% endif %}
                </div>
                <div class="mb-2">
                    {% if laf_roomsMoreOptionsCollapsed == 1 %}
                    <a data-mdb-toggle="collapse" class=" caretdown" href="#collapseExample" aria-expanded="false"
                       aria-controls="collapseExample">
                        {{ 'Erweiterte Optionen'|trans }}
                    </a>
                    <div class="collapse" id="collapseExample">
                        {% endif %}
                        <div class="mt-3">


                            <div class="row">
                                {% if form.scheduleMeeting is defined %}

                                    <div class="col-12 d-flex align-items-start with-help">
                                        {{ form_row(form.scheduleMeeting) }}

                                        <a tabindex="0" data-mdb-toggle="popover" data-mdb-trigger="focus"
                                           data-mdb-content="{{ 'Es wird eine Terminumfrage erstellt, keine Konferenz.'|trans }}"><i
                                                    class="fa fa-question-circle"></i></a>
                                    </div>
                                {% endif %}

                                {% if form.onlyRegisteredUsers is defined %}
                                    <div class="col-12 d-flex align-items-start with-help">
                                        {{ form_row(form.onlyRegisteredUsers) }}

                                        <a tabindex="0" data-mdb-toggle="popover" data-mdb-trigger="focus"
                                           data-mdb-content="{{ 'Nur Nutzer, welche einen Account auf der Plattform haben können diesem Meeting beitreten. Es ist somit der Benutzername und das Passwort erforderlich. Damit wird ein zusätzlicher Schutz eingeführt.'|trans }}"><i
                                                    class="fa fa-question-circle"></i></a>
                                    </div>
                                {% endif %}
                                {% if form.public is defined %}
                                    <div class="col-12 d-flex align-items-start with-help">
                                        {{ form_row(form.public) }}

                                        <a tabindex="0" data-mdb-toggle="popover" data-mdb-trigger="focus"
                                           data-mdb-content="{{ 'Es wird ein Link erstellt, welchen Sie weitergeben können. Über diesen Link können sich Teilnehmer, selber auf die Teilnehmerliste eintragen. Sie können die Teilnerliste bearbeiten und Teilnehmer entfernen.'|trans }}"><i
                                                    class="fa fa-question-circle"></i></a>
                                    </div>
                                {% endif %}
                                {% if form.maxParticipants is defined %}
                                    <div class="col-lg-12">
                                        <div id="maxParticipants" class=" collapse ">
                                            <div class="row">
                                                <div class="col-12 d-flex align-items-start with-help">
                                                    {{ form_row(form.maxParticipants) }}

                                                    <a tabindex="0" data-mdb-toggle="popover" data-mdb-trigger="focus"
                                                       data-mdb-content="{{ 'Maximale Anzahl an Teilnehmer, die sich per Selbsteinschreibung bei der Konferenz anmelden können'|trans }}"><i
                                                                class="fa fa-question-circle"></i></a>
                                                </div>
                                                {% if form.waitinglist is defined %}
                                                    <div class="col-12 d-flex align-items-start with-help">
                                                        {{ form_row(form.waitinglist) }}

                                                        <a tabindex="0" data-mdb-toggle="popover"
                                                           data-mdb-trigger="focus"
                                                           data-mdb-content="{{ 'Wenn es eine begrenzte Anzahl von Teilnehmer gibt dann können sich Teilnehmer auf einer Warteliste einschreiben und der Moderator kann diese manuell akzeptieren'|trans }}"><i
                                                                    class="fa fa-question-circle"></i></a>
                                                    </div>
                                                {% endif %}
                                            </div>


                                        </div>
                                    </div>
                                {% endif %}
                                {% if form.showRoomOnJoinpage is defined %}
                                    <div class="col-12 d-flex align-items-start with-help">
                                        {{ form_row(form.showRoomOnJoinpage) }}

                                        <a tabindex="0" data-mdb-toggle="popover" data-mdb-trigger="focus"
                                           data-mdb-content="{{ 'Auf der Beitretenseite eines Servers wird diese Konferenz angezeigt.'|trans }}"><i
                                                    class="fa fa-question-circle"></i></a>
                                    </div>
                                {% endif %}

                                {% if form.dissallowScreenshareGlobal is defined %}
                                    <div class="col-lg-12">
                                        <div id="enableFeateureJwt"
                                             class="{% if serverchoose is null or not serverchoose.featureEnableByJWT %}d-none{% endif %} row">
                                            <div class="col-12 d-flex align-items-start with-help">
                                                {{ form_row(form.dissallowScreenshareGlobal) }}

                                                <a tabindex="0" data-mdb-toggle="popover" data-mdb-trigger="focus"
                                                   data-mdb-content="{{ 'Teilnehmer dürfen Ihren Bildschirm nicht teilen. Dies kann in der Teilnehmerübersicht für jeden Teilnehmer individuell angepasst werden'|trans }}"><i
                                                            class="fa fa-question-circle"></i></a>
                                            </div>
                                        </div>
                                    </div>
                                {% endif %}
                                {% if form.totalOpenRooms is defined %}
                                    <div class="col-12 d-flex align-items-start with-help">
                                        {{ form_row(form.totalOpenRooms) }}

                                        <a tabindex="0" data-mdb-toggle="popover" data-mdb-trigger="focus"
                                           data-mdb-content="{{ 'Es gibt keine Teilnehmerliste. Die Teilnehmer können der Konferenz durch den generierten Link beitreten.'|trans }}">
                                            <i class="fa fa-question-circle"></i>
                                        </a>
                                    </div>
                                {% endif %}
                                {% if form.allowMaybeOption is defined %}
                                <div class="col-12 d-flex align-items-start with-help">
                                    {{ form_row(form.allowMaybeOption) }}

                                    <a tabindex="0" data-mdb-toggle="popover" data-mdb-trigger="focus"
                                       data-mdb-content="{{ 'Teilnehmer können bei der Abstimmung mit "Vielleicht" abstimmen.'|trans }}">
                                        <i class="fa fa-question-circle"></i>
                                    </a>
                                </div>
                                {% endif %}
                                {% if form.maxUser is defined %}
                                    <div class="col-12 d-flex align-items-start with-help">
                                        {{ form_row(form.maxUser) }}

                                        <a tabindex="0" data-mdb-toggle="popover" data-mdb-trigger="focus"
                                           data-mdb-content="{{ 'rooms.help.setmaxparticipantsHardLimit'|trans }}">
                                            <i class="fa fa-question-circle"></i>
                                        </a>
                                    </div>
                                {% endif %}
                            </div>
                        </div>
                        {% if laf_roomsMoreOptionsCollapsed == 1 %}
                    </div>
                    {% endif %}
                </div>
                {{ form_rest(form) }}
                {{ form_end(form) }}
            </div>
                {% else %}
                    <div class="row">
                        <div class="col-12">
                            <div class="alert alert-danger" role="alert">
                                {% if laf_CreateServerOpenToEveryone == 1 %}
                                    {{ 'newRoom.error.noServer.addServer'|trans }}
                                {% else %}
                                    {{ ''|trans }}
                                    {% trans with {'adminEmail':laf_administratorEmail} %}newRoom.error.noServer.askAdmin{% endtrans %}
                                {% endif %}
                            </div>
                        </div>
                    </div>
                {% endif %}
        </div>
        <div class="modal-footer">
            <button href="#" id="saveRoom" class="btn btn-primary">{{ 'Speichern'|trans }}</button>
        </div>
    </div>
</div>
